package wuxianshua.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import wuxianshua.pojo.User;
import wuxianshua.service.UserService;

/**
 * Description:
 * Datetime:    2021/2/20   19:52
 * Author:   jianglei
 */
@RestController
public class UserController {

    @Autowired
private UserService userService;

    @ResponseBody
    @GetMapping("/userinfo/{userid}")
    public User getUserInfo(@PathVariable("userid") String userid){
        return userService.getUSerById(userid);
    }
}